<template>
  <div style="margin: 0 20px;">
    <div style="height: 40px; line-height: 40px;">
      <span style="font-weight: 600;  font-size: 16px; color: #333333;">支付方式</span>
    </div>
    <div style="display: flex; flex-direction: row;">
      <div
        :class="{'text-active': this.index == 0}"
        @click="this.index = 0"
        class="text"
      >货到付款</div>
      <div
        :class="{'text-active': this.index == 1}"
        @click="this.index = 1"
        class="text"
      >在线支付</div>
    </div>
    <el-divider style="margin: 10px 0"></el-divider>
  </div>
</template>

<script>
export default {
  data() {
    return {
      index: 1,
    };
  },
};
</script>

<style scoped>
.text {
  width: 120px;
  height: 20px;
  display: flex;
  justify-content: center;
  line-height: 20px;
  padding: 4px 4px;
  margin-right: 10px;
  border: 1px solid #dddddd;
  cursor: pointer;
}

.text-active {
  border: 1px solid #3271ae;
  background: linear-gradient(-45deg, #3271ae 12px, #fff 0);
}
</style>